package io;

import java.io.FileInputStream;

public class ReadStringDemo {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("fos.txt");
        int len = fis.available();
        byte[] data = new byte[len];
        fis.read(data);
        String line = new String(data,"UTF-8");
        System.out.println(line);
        fis.close();
    }
}
